interface StylesMap {
  [key: string]: (params: any, obj: any) => any;
}

// 行、列样式
function demo ({ row, column, _rowIndex, _columnIndex }: any, obj: any) {
  const status = column.property
  const statusText = row[status]
  if (status === 'statusStr' && statusText === '启用') {
    obj.color = 'var(--el-color-success)'
  } else if (status === 'statusStr' && statusText === '禁用') {
    obj.color = 'var(--el-color-danger)'
  }
  return obj
}

export default {
  demo
} as StylesMap
